package edu.zjut.hjg.saas.web.model.form;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;

public class CreateAppForm {

    @Length(min = 3, max = 128)
    private String name;

    private String cityCode;

    @Pattern(regexp = "^[a-zA-Z0-9-]{3,16}$")
    private String domainPrefix;

    @Length(min = 5, max = 512)
    private String introduction;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getDomainPrefix() {
        return domainPrefix;
    }

    public void setDomainPrefix(String domainPrefix) {
        this.domainPrefix = domainPrefix;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    @Override
    public String toString() {
        return "CreateAppForm [cityCode=" + cityCode + ", domainPrefix=" + domainPrefix
                + ", introduction=" + introduction + ", name=" + name + "]";
    }
}
